package com.connector.server.util;

import org.slf4j.LoggerFactory;
import com.connector.base.connection.Connection;
import com.connector.base.connection.channel.SocketChannel;
import java.util.concurrent.ConcurrentMap;
import com.connector.base.connection.impl.LocalConnectionRegistry;
import com.connector.server.jmx.JmxMessageBean;
import org.slf4j.Logger;

public class SendMsgUtil
{
    private static final Logger log;

    public static void sendMsg(final JmxMessageBean jmxMessageBean) {
        final ConcurrentMap<SocketChannel, Connection> cons = LocalConnectionRegistry.getConnections();
        final Thread sendThread = new Thread(new SendMsgUtilThread(jmxMessageBean, cons));
        sendThread.start();
    }

    static {
        log = LoggerFactory.getLogger(SendMsgUtil.class);
    }
}
